<%@page import="com.mongodb.DBObject"%>
<%@page import="com.mongodb.BasicDBObject"%>
<%@page import="com.mongodb.DBCursor"%>
<%@page import="data.Data"%>
<%@page import="com.mongodb.DBCollection"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Random"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.Calendar"%>
<%
DBCollection collection = Data.data("domain");
Random random = new Random();
int rand = random.nextInt(1000000);
DBCursor cursor = collection.find(new BasicDBObject("random",new BasicDBObject("$lt",rand))).limit(7);
%>
<hr size="1" class="hr"/>
<h2 class="menu">Random sites</h2>
<ul class="featured">
	<%
	while(cursor.hasNext())
	{
		DBObject dbObject = cursor.next();
	%>
		<li><a href="/domain/<%=dbObject.get("name") %>" title="<%=dbObject.get("name") %>"><%=dbObject.get("name") %></a></li>
	<%
	}
	%>
</ul>